WaitForProperty

Waits a period of time to find a value in a window or control property before continuing with the next statement and returns True or False to indicate if it is found.

Syntax

WaitForProperty("PropertyName", "Value", WaitTime)

Arguments

Argument Description
PropertyName Property name to search for.
Value Property value to search for.
WaitTime Maximum number of milliseconds to search for the property value..

Return value

Value Description
True Property value was found.
False Property value was not found.

Supported objects

Button, Calendar, Cell, CheckBox, ColumnHeader, ComboBox, Control, DateTimePicker, EditBox, Grid, HTMLElement, HTMLLink, HTMLTable, Image, Item, Label, Link, ListBox, ListView, Menu, NavigationField, PopupMenu, ProgressBar, RadioButton, Row, RowHeader, ScrollBar, Slider, SpinBox, SubItem, Tab, TabBar, ToolBar, Tree

Example

If Window("Transaction Complete").Button("Close").WaitForProperty("Enabled", True, 10000) Then

Window("Transaction Complete").Button("Close").Click()

Else

Warning("Close button not enabled within 10 seconds. Force closing dialog.")

KeyPress("Alt, F4")

End If